home *** CD-ROM | disk | FTP | other *** search
Java Source | 2000-04-03 | 2.3 KB | 93 lines |
- /*
- * ServletException.java -- Thrown to indicate a servlet problem
- *
- * Copyright (c) 1998, 1999 by Free Software Foundation, Inc.
- * Written by Paul Siegmann (pauls@euronet.nl)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published
- * by the Free Software Foundation, version 2. (see COPYING.LIB)
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
- */
-
- package javax.servlet;
-
- /**
- * This exception is thrown by a servlet when a servlet related problem occurs.
- *
- #ifdef SERVLET_2_0
- * @version Servlet API 2.0
- #endif
- #ifdef SERVLET_2_1
- * @version Servlet API 2.1
- #endif
- #ifdef SERVLET_2_2
- * @version Servlet API 2.2
- #endif
- * @since Servlet API 1.0
- * @author Paul Siegmann (pauls@euronet.nl)
- */
- public class ServletException
- extends Exception
- {
- private Throwable theCause = null;
-
- /**
- * Creates a new ServletException.
- *
- * @since Servlet API 2.0
- */
- public ServletException() {
- super();
- }
-
-
- /**
- * Creates a new ServletException with a message.
- *
- * @since Servlet API 1.0
- *
- * @param message why this exception occured
- */
- public ServletException(String message) {
- super(message);
- }
-
- #ifdef SERVLET_2_0
- #else
- /**
- * Creates a new ServletException with a message
- * and what caused the exception.
- *
- * @since Servlet API 2.1
- *
- * @param message why this exception occured
- * @param cause what made this exception occur
- */
- public ServletException(String message, Throwable cause) {
- super(message);
- theCause = cause;
- }
-
-
- /**
- * Gives the Throwable that caused this exception if known, otherwise null.
- *
- * @since Servlet API 2.1
- *
- * @return Throwable that caused this exception
- */
- public Throwable getRootCause() {
- return theCause;
- }
- #endif
- }
-